/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package mapper;

import java.io.FileInputStream;
import java.util.ArrayList;



/**
 *
 * @author mete
 */
public  class  persistenceFacade {
    private static  persistenceFacade per;
    FileInputStream st ;
    private persistenceFacade(){
    	

    }
    public static persistenceFacade getPersistence(){
        if (per == null){
            per = new persistenceFacade();
        }
        return per;
    }
    public ArrayList get( Object oid, Class persistanst) {
	iMapper mapper = (iMapper) mappers.get( persistanst );
	return mapper.get( oid );
	}
    public boolean put( Object oid ) {
	iMapper mapper = (iMapper) mappers.get( oid.getClass() );
	return mapper.put( oid);
	}
    public boolean update( Object oid) {
	iMapper mapper = (iMapper) mappers.get( oid.getClass() );
	return mapper.update( oid);
	}
    public boolean delete( Object oid) {
	iMapper mapper = (iMapper) mappers.get( oid.getClass() );
	System.out.println(mapper);
	return mapper.delete( oid);
	}
}
